﻿<Window x:Class="WPF.DataBinding.MasterDetail.MasterDetailWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        Title="MasterDetailWindow" Height="337.113" Width="470.103">
    <Grid DataContext="{x:Static Member=Fonts.SystemFontFamilies}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="75"/>
            <ColumnDefinition Width="90"/>
        </Grid.ColumnDefinitions>

        <ListBox ItemsSource="{Binding}" Grid.RowSpan="3" IsSynchronizedWithCurrentItem="True">
            <ListBox.ItemTemplate>
                <DataTemplate DataType="{x:Type FontFamily}">
                    <TextBlock Text="{Binding}" FontFamily="{Binding}" FontSize="30"/>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

        <TextBlock Grid.Column="1" Grid.Row="0" Text="Name:"/>
        <TextBlock Grid.Column="2" Grid.Row="0" Text="{Binding FamilyNames[en-US]}" FontFamily="{Binding /}"/>

        <TextBlock Grid.Column="1" Grid.Row="1" Text="Baseline:"/>
        <TextBlock Grid.Column="2" Grid.Row="1" Text="{Binding /Baseline}"/>

        <TextBlock Grid.Column="1" Grid.Row="2" Text="Line Spacing:"/>
        <TextBlock Grid.Column="2" Grid.Row="2" Text="{Binding /LineSpacing}"/>

    </Grid>
</Window>
